"""
统计word.txt中itheima出现的次数
"""
f=open("F:\Python\word.txt","r",encoding="UTF-8")
# content=f.read()
# print(content.count("itheima"))
# 一行一行的读取，判断单词出现的次数
count=0
list_word=f.readlines()
for x in list_word:
    count+=x.count("itheima")
print(count)

f.close()